package net.oschina.dajiangnan.wx.process.pay.xmlbean;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import net.oschina.dajiangnan.util.XStreamHelper;
import net.oschina.dajiangnan.wx.util.Signature;

@XStreamAlias("xml")
public class ScanQrcodeNotifyReq extends XmlBean{
    
    
    
    public static void main(String [] args) throws IllegalAccessException{
        
                String xmlStr = "<xml>"+
                        "<sign>64F9F22EAC047F6D7E6FB5C04470181F</sign>"+
                        "<appid>wxf1aace32b27f457c</appid>"+
                        "<openid>obeY5uJRoxM6O73tMSN0HwSopnJw</openid>"+
                        "<mch_id>1242696902</mch_id>"+
                        "<is_subscribe>Y</is_subscribe>"+
                        "<nonce_str>CHdp1fG8TsAYAvKJ</nonce_str>"+
                        "<product_id>1</product_id>"+
                        "</xml>";
                
                ScanQrcodeNotifyReq scanQrcodeNotifyReq = XStreamHelper.toBean(xmlStr, ScanQrcodeNotifyReq.class);
                System.out.println(scanQrcodeNotifyReq.islegalSign("123abcdefghiJKLMNOPQRstuvmsyz456"));
                

              scanQrcodeNotifyReq.setSign(null);
              System.out.println(Signature.getSign(scanQrcodeNotifyReq, null, "123abcdefghiJKLMNOPQRstuvmsyz456"));
    }
    
    
    
    /**
     * <xml>
  <appid>wx2e02e746d17d6b15</appid>
  <openid>oL570s51GOD8RjhxmJ8f0sgFk_5E</openid>
  <mch_id>1250643401</mch_id>
  <is_subscribe>Y</is_subscribe>
  <nonce_str>YIY6nmTOuXvqgIIP</nonce_str>
  <product_id>123</product_id>
  <sign>9DF1F29C68216C430ACE20F9C88B0D84</sign>
</xml>
     * @throws IllegalAccessException 
     */
    
    
    
    @XStreamAlias("appid")
    private String appid;
    
    @XStreamAlias("openid")
    private String openid;
    
    @XStreamAlias("mch_id")
    private String mch_id;
    
    @XStreamAlias("is_subscribe")
    private String is_subscribe;
    
    @XStreamAlias("nonce_str")
    private String nonce_str;
    
    @XStreamAlias("product_id")
    private String product_id;
    
    

    
    public String getAppid() {
        return appid;
    }
    public void setAppid(String appid) {
        this.appid = appid;
    }
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public String getMch_id() {
        return mch_id;
    }
    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }
    public String getIs_subscribe() {
        return is_subscribe;
    }
    public void setIs_subscribe(String is_subscribe) {
        this.is_subscribe = is_subscribe;
    }
    public String getNonce_str() {
        return nonce_str;
    }
    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }
    public String getProduct_id() {
        return product_id;
    }
    public void setProduct_id(String product_id) {
        this.product_id = product_id;
    }
    
    
    
    
}
